package com.six.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.six.domain.entity.Table;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TableMapper extends BaseMapper<Table> {
    int insert(Table table);

    List<Table> selectByStore(Long storeId);

    Table selectById(Long id);

    List<Table> selectAllTablesByStore(Long storeId);

    int updateStatus(@Param("id") Long id, @Param("status") String status);

    boolean exists(@Param("storeId") Long storeId, @Param("tableNumber") String tableNumber);
}